package com.findu.control;

import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.findu.R;

public class Public_title_dynamic {

	public ImageView imageView_left, imageView_right;
	public TextView textView_center;
	public TextView textView_left, textView_right;
	public View view;

	public Public_title_dynamic(View view) {
		this.view = view;
		imageView_left = (ImageView) view
				.findViewById(R.id.public_title_dynamic__liftImage);
		imageView_right = (ImageView) view
				.findViewById(R.id.public_title_dynamic_rightImage);
		textView_center = (TextView) view
				.findViewById(R.id.public_title_dynamic_textView);
		textView_left = (TextView) view
				.findViewById(R.id.public_title_dynamic_textViewLeft);
		textView_right = (TextView) view
				.findViewById(R.id.public_title_dynamic_textViewright);
	}

	// 左边图片显示
	public void setLeftImageVisible_Show() {
		imageView_left.setVisibility(View.VISIBLE);
	}

	// 左边图片隐藏
	public void setLeftImageVisible_Gone() {
		imageView_left.setVisibility(View.GONE);
	}

	// 右边图片显示
	public void imageView_right_ImageVisible_Show() {
		imageView_right.setVisibility(View.VISIBLE);
	}

	// 右边图片隐藏
	public void imageView_right_ImageVisible_Gone() {
		imageView_right.setVisibility(View.GONE);
	}

	// 左边Text显示
	public void textView_left_Visible_Show() {
		textView_left.setVisibility(View.VISIBLE);
	}

	// 左边Text隐藏
	public void textView_left_Visible_Gone() {
		textView_left.setVisibility(View.INVISIBLE);
	}

	// 右边Text显示
	public void textView_right_Visible_Show() {
		textView_right.setVisibility(View.VISIBLE);
	}

	// 右边Text隐藏
	public void textView_right_Visible_Gone() {
		textView_right.setVisibility(View.GONE);
	}

	// ����ͼƬ
	public void setLeftImage(int imageId) {
		imageView_left.setImageResource(imageId);
	}

	// ����ͼƬ�ɼ�
	public void setLeftImageVisiable(Boolean ishow) {
		if (ishow) {
			imageView_left.setVisibility(View.INVISIBLE);
		} else {
			imageView_left.setVisibility(View.VISIBLE);
		}
	}

	// ����ͼƬ
	public void setRighttImage(int imageId) {
		imageView_right.setImageResource(imageId);
	}

	// ����ͼƬ�ɼ�
	public void setRighttImageVisiable(Boolean ishow) {
		if (ishow) {
			imageView_right.setVisibility(View.INVISIBLE);
		} else {
			imageView_right.setVisibility(View.VISIBLE);
		}
	}

	public void setTextLeft(String strlf) {
		textView_left.setText(strlf);
	}

	public void setTextRight(String StrRi) {
		textView_right.setText(StrRi);
	}
	public void setTextRight_Gone(){
		textView_right.setVisibility(View.INVISIBLE);
	}

	// �޸ı�������
	public void setTextView(String str) {
		textView_center.setText(str);
	}
}
